<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>首页</title>
  <link rel="stylesheet" href="./libs/swiper/swiper-bundle.min.css">
  <link rel="stylesheet" href="css/index.css">
  <script src="./libs/requirejs/require.min.js" data-main="./js/index"></script>
</head>
<body>
    <div class="logo"></div>
    <div id="ball"></div>
    <div class="content1"></div>
    <!-- 轮播图 -->
    <h1>新品推荐</h1>
    <div class="swiper-container" >
        
            <div class="swiper-wrapper" >
                <div class="swiper-slide" >
                </div>
                <div class="swiper-slide">
                </div>
                <div class="swiper-slide">
                </div>
            </div>


        

        <!-- 如果需要导航按钮 -->
        <div class="swiper-button-prev" style="color:black;"></div>
        <div class="swiper-button-next" style="color:black;"></div>
    </div>
    <h1>今日大牌推荐</h1>
  <!-- 渲染推荐商品的数据 -->
  <ul class="hot"></ul>

  <!-- 定义渲染推荐商品项的模板 -->
  <script type="text/html" id="hot-template">
    {{each products prod}}
    <li class="hot-item" data-id="{{prod.id}}">
      <div><img class="image" src="{{prod.image}}" alt=""></div>
      <div class="title">{{prod.title}}</div>
      <div>
        <span class="money1">￥</span><span class="price">{{prod.price}}</span>
        <span class="money2">￥</span><span class="originprice">{{prod.originPrice}}</span>
        <button class="add-to-cart">加入购物车</button>
      </div>
    </li>
    {{/each}}
  </script>


  
  <script type="text/html" id="swiper-template">
    {{each products prod}}
        <li>
            <div><img src="{{prod.image}}" class="img"></div>
            <div><img src="{{prod.logo}}" class="img1"></div>
            <div>
              <div class="swip-title">{{prod.title}}</div>
              <div class="swip-price">￥{{prod.price}}</div>
            </div>
        </li>
    {{/each}}
  </script>
</body>
</html>